#ifndef CSPECIALITEM_H
#define CSPECIALITEM_H

#include "CEntity.h"
#include <list>
using namespace std;

class CSpecialItem : public CEntity
{
public:

	CSpecialItem();
	virtual ~CSpecialItem();

	virtual void Render();
	virtual void Update();
	virtual void UpdateAttached();
	virtual void Load();
	virtual void TakeDamage( float damage = 1 );
	virtual void Kill();

	void AttachToHost( CEntity* host );
	//void DisconnectFromHost();


	void SetTimeAlive( float timealive )		{ TimeAlive = timealive; }
	void SetTimeUntilAlive( float time )		{ TimeUntilAlive = time; }
	//void UpdateTimeAlive()						{ TimeAlive += CEntity::pParent->DeltaTime; }
	//void UpdateTimeUntilAlive()					{ TimeUntilAlive -= pParent->DeltaTime; }
	void SetWaiting( bool waitingforspawn )		{ Waiting = waitingforspawn; }
	//void SetParentWave( CWave* wave )			{ ParentWave = wave; }
	
	void SetIsItemAttached( bool attach )       { m_bIsItemAttached = attach; }
	void SetUpdating( bool updating )			{ m_bUpdating = updating; }
	void SetHost( CEntity* host )				{ m_pHost = host; }

	float GetTimeAlive()		{ return TimeAlive; }
	float GetTimeUntilAlive()	{ return TimeUntilAlive; }
	bool  GetWaiting()			{ return Waiting; }

	bool  GetIsItemAttached()	{ return m_bIsItemAttached; }
	bool  GetUpdating()			{ return m_bUpdating; }
	CEntity* GetHost()			{ return m_pHost; }
	

	float	 TimeAlive;			//the time passed since this enemy has been alive
	float	 TimeUntilAlive;	//the time until this enemy will revive
	bool	 Waiting;			//waiting for spawn

	bool	 m_bIsItemAttached; //is it attached, for attached update function calls
	bool	 m_bUpdating;		//is it alive and/or updating, if not it needs to be removed from whatever list it's in
	CEntity* m_pHost;			//the ship its attached to

	float	ShipSpeed;

};


#endif